export function isHttp(url) {//判断是不是http外联
  return url.indexOf("http://") !== -1 || url.indexOf("https://") !== -1;
}
 export function isExternal(path) {
   return /^(https?:|mailto:|tel:)/.test(path);
}
export function getNormalPath(p) {
  if (p.length === 0 || !p || p == "undefined") {
    return p;
  }
  let res = p.replace("//", "/");
  if (res[res.length - 1] === "/") {
    return res.slice(0, res.length - 1);
  }
  return res;
}
 
export function parseStrEmpty(str) {
  if (!str || str == "undefined" || str == "null") {
    return "";
  }
  return str;
}
